@extends('app')

@section('content')
<ul class="nav nav-tabs">
    <li class="active"><a href="{{ url('/admin/content/ads')}}">信息列表</a></li>
    <li><a href="{{ url('/admin/content/ads/create') }}">信息添加</a></li>
</ul>

<div class="form-inline mt20">

</div>

<h5 class="sub-header"></h5>
<div class="table-responsive">
    <table class="table table-striped">
        <thead>
        <tr>
            <th>编号</th>
            <th>名称</th>
            <th>广告位</th>
            <th>类型</th>
            <th>所属应用</th>
            <th>发布时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        @foreach($ads as $res)
        <tr id="news_{{ $res->id }}">
            <td>{{ $res->id }}</td>
            <td><a href="{{ url('admin/content/ads/'.$res->id.'/edit') }}">{{ $res->title }} </a></td>
            <td>{{ $res->ads_position }}</td>
            <td>{{ $res->type_name }}</td>
            <td>{{ $res->app_name }}</td>
            <td>{{ $res->updated_at }}</td>
            <td>
                <a href="{{ url('/admin/content/ads/'.$res->id.'/edit') }}"><i class="glyphicon glyphicon-edit"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="javascript:void(0);" onclick="delete_one('/admin/content/ads/{{$res->id}}','{{$res->id}}','{{ csrf_token() }}')">
                    <i class="glyphicon glyphicon-remove-sign"></i>
                </a>
            </td>
        </tr>
        @endforeach
        </tbody>
    </table>
</div>
<div>{!! $ads->render() !!} </div>
@endsection
